package com.aviccxzx.smarthome.UserModule;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.aviccxzx.smarthome.R;
import com.aviccxzx.smarthome.base.GosUserModuleBaseActivity;


/**
 * Created by joey on 2016/10/25.
 */
public class TwobarShareAct extends GosUserModuleBaseActivity implements View.OnClickListener {
    ImageView twobar_img;
    private Bitmap bitmap;
    private byte [] bis;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            setContentView(R.layout.twobar_share_lay_v19);
        }else {
        }

        initView();
    }

    private void initView() {
        ((TextView) findViewById(R.id.title_tv)).setText("设备分享");
        findViewById(R.id.ll_title_left_view).setOnClickListener(this);
        twobar_img=(ImageView)findViewById(R.id.twobar_img);
        bis=getIntent().getByteArrayExtra("bitmap");
        bitmap= BitmapFactory.decodeByteArray(bis, 0, bis.length);
        twobar_img.setImageBitmap(bitmap);
    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_title_left_view:
                finish();
                break;
        }
    }
}
